<?php
$matkul=$_POST["matkul"];
$ta=$_POST["ta"];
$sem=$_POST["sem"];
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Hasil</title>
<link href="/ta/pusing2.css" rel="stylesheet" type="text/css"></head>

<body>
<div id="wrap"><br />
<table width="100%" border="1" align="center">
  <tr>
    <td colspan="2" style="text-align: center"><strong>Jadwal Ujian Semester <?php echo $sem; ?> Tahun Ajaran <?php echo $ta;?></strong></td>
  </tr>
</table>

<?php
include_once "query2.php";
echo "<table border='1' align='center'>";echo "<tr><td align='center'>Hari</td><td align='center'>Slot</td><td align='center'>Mata Kuliah</td></tr>";
for($urut_f=1;$urut_f<=$matkul;$urut_f++){
$jj=$_POST["jprobe$urut_f"];
if ($urut_f<=2){echo "<tr><td>Senin1</td><td>".$urut_f%3 ."</td><td>";}
elseif ($urut_f<=3){echo "<tr><td>Senin1</td><td>3</td><td>";}
elseif ($urut_f<=5){echo "<tr><td>Selasa1</td><td>".$urut_f%3 ."</td><td>";}
elseif ($urut_f<=6){echo "<tr><td>Selasa1</td><td>3</td><td>";}
elseif ($urut_f<=8){echo "<tr><td>Rabu1</td><td>".$urut_f%3 ."</td><td>";}
elseif ($urut_f<=9){echo "<tr><td>Rabu1</td><td>3</td><td>";}
elseif ($urut_f<=11){echo "<tr><td>Kamis1</td><td>".$urut_f%3 ."</td><td>";}
elseif ($urut_f<=12){echo "<tr><td>Kamis1</td><td>3</td><td>";}
elseif ($urut_f<=14){echo "<tr><td>Jumat1</td><td>".$urut_f%3 ."</td><td>";}
elseif ($urut_f<=15){echo "<tr><td>Jumat1</td><td>3</td><td>";}
elseif ($urut_f<=17){echo "<tr><td>Senin2</td><td>".$urut_f%3 ."</td><td>";}
elseif ($urut_f<=18){echo "<tr><td>Senin2</td><td>3</td><td>";}
elseif ($urut_f<=20){echo "<tr><td>Selasa2</td><td>".$urut_f%3 ."</td><td>";}
elseif ($urut_f<=21){echo "<tr><td>Selasa2</td><td>3</td><td>";}
elseif ($urut_f<=23){echo "<tr><td>Rabu2</td><td>".$urut_f%3 ."</td><td>";}
elseif ($urut_f<=24){echo "<tr><td>Rabu2</td><td>3</td><td>";}
elseif ($urut_f<=26){echo "<tr><td>Kamis2</td><td>".$urut_f%3 ."</td><td>";}
elseif ($urut_f<=27){echo "<tr><td>Kamis2</td><td>3</td><td>";}
elseif ($urut_f<=29){echo "<tr><td>Jumat2</td><td>".$urut_f%3 ."</td><td>";}
elseif ($urut_f<=30){echo "<tr><td>Jumat2</td><td>3</td><td>";}

	for($jj2=1;$jj2<=$jj;$jj2++){
	$nmrnya=$_POST["probe$urut_f$jj2"];
	//echo $_POST["probe$urut_f$jj2"]."<br/>";
	echo $nmr_mtkul[$nmrnya]."<br />";
	}
echo "</td></tr>";
}
echo "</table>";
?> 
 
<table width="100%" border="0" align="center">
  <tr>
    <td align="center"><strong>Waktu Eksekusi: <?php echo $_POST["ekse"]; ?></strong></td>
  </tr>
  <tr>
	<td align="center"><strong>Fitness Terbaik: <?php echo $_POST["fitgen"];?>--Fitness Rata-rata <?php echo $_POST["fitav"]; ?></strong></td>
  </tr>
</table>
</div>
</body>
</html>